Page({
  data: {
    skillsList: [
      {
        id: 1,
        name: '电脑维修',
        category: '维修服务',
        description: '提供电脑软硬件维修服务，经验丰富。',
        serviceMethod: 'offline',
        contactInfo: '135****5004',
        serviceTime: '工作日晚上和周末',
        price: '50-200元',
        experience: '5年维修经验',
        status: 'published',
        createTime: '2025-01-27'
      },
      {
        id: 2,
        name: '英语辅导',
        category: '教育培训',
        description: '英语专业毕业，可提供小学到高中英语辅导。',
        serviceMethod: 'both',
        contactInfo: '137****7005',
        serviceTime: '周末全天',
        price: '80-150元/小时',
        experience: '3年教学经验',
        status: 'published',
        createTime: '2025-01-27'
      },
      {
        id: 3,
        name: '手工编织',
        category: '生活服务',
        description: '擅长毛衣、围巾等编织，可教授编织技巧。',
        serviceMethod: 'offline',
        contactInfo: '134****4006',
        serviceTime: '每周三下午',
        price: '30-100元',
        experience: '10年编织经验',
        status: 'published',
        createTime: '2025-01-27'
      }
    ]
  },

  onLoad: function() {
    wx.setNavigationBarTitle({ title: '简易技能列表测试' });
  },

  // 服务方式文本转换
  getServiceMethodText: function(method) {
    const methodMap = {
      'online': '线上服务',
      'offline': '线下服务',
      'both': '两者皆可'
    };
    return methodMap[method] || '未知';
  },

  // 模拟点击事件
  contactProvider: function(e) {
    wx.showToast({
      title: '联系功能测试',
      icon: 'none'
    });
  },

  viewSkillDetail: function(e) {
    wx.showToast({
      title: '查看详情功能测试',
      icon: 'none'
    });
  }
});